package sshj.process.bean;

import java.util.List;

public class InspurSSHDirectoryBean {
    private String path;
    /**
     * 此文件夹的大小，精确到B
     */
    private long size;
    /**
     * 此文件夹下的所有文件
     */
    private List<InspurSSHFileBean> files;

    /**
     * 此文件夹下的所有文件夹
     */
    private List<InspurSSHDirectoryBean> directories;

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public long getSize() {

        for (InspurSSHFileBean file : files) {
            size += file.getSize();
        }
        for (InspurSSHDirectoryBean dir : directories) {
            size += dir.getSize();
        }
        return size;
    }


    public List<InspurSSHFileBean> getFiles() {
        return files;
    }

    public void setFiles(List<InspurSSHFileBean> files) {
        this.files = files;
    }

    public List<InspurSSHDirectoryBean> getDirectories() {
        return directories;
    }

    public void setDirectories(List<InspurSSHDirectoryBean> directories) {
        this.directories = directories;
    }
}
